#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int x;
	int f;
	int m;
	int a;
	scanf("%d", &a);
	x = a / 60 / 60;
	f = a / 60 % 60;
	m = a % 60;
	printf("%d %d %d", x, f, m);
	return 0;
}